#ifndef QOCONTROL_H
#define QOCONTROL_H

/**
* @file qocontrol.h
* @describe QoControl
* @author gaoyuelong
* @date 2022/05/07
*/

#include "common.h"
#include "qomodel.h"
#include <QObject>

//处理注册、登录
class QoControl : public QObject
{
    Q_OBJECT
public:
    explicit QoControl(QObject *parent = nullptr);

    //登录操作
    void login(const QString &strAccount, const QString &strPassword);
    //注册操作
    void reg(const QString &strNickName, const QString &strPassword);

signals:
    void signalLogin(E_ERROR_TYPE, const QJsonObject &);
    void signalReg(const QString &);

private slots:
    //接收到model层的消息
    void slotRecvMsg(const QJsonObject &);

private:
    QoModel *m_pModel;
};

#endif // QOCONTROL_H
